﻿using SelfManagement.Database.POCO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SelfManagement.Site.Models.Session
{
    public class UserSession
    {
        public UserSession(User user)
        {
            UserEntity = user;
        }

        public User UserEntity { get; private set; }

        /// <summary>
        /// 用户显示名称
        /// </summary>
        public string DisplayName => UserEntity.TrueName;

        /// <summary>
        /// 用户头像
        /// </summary>
        public string FaceImg => UserEntity.UserFace;

        /// <summary>
        /// 用户标识，默认为id
        /// </summary>
        public string Identity => UserEntity.Id;
        
    }
}